﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Projekt_2_ASP.NET
{
    public partial class Error : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
            var exception = Application["Exception"] as Exception;

            if (exception != null)
                LabelErrorMessage.Text = exception.Message;
            else
                Response.Redirect("Main.aspx");
        }
    }
}